package com.example.usb.util;

/**
 * created by liangkun on ${DATA}
 * Describe:百度AI错误码返回
 */

public class ErrorUtil {
    /**
     * 返回错误码的数据
     *
     * @param error 错误码
     * @return 中文信息
     */
    public static String getErrorString(String error) {
        String str = "";
        switch (error) {
            case "222201":
            case "222205":
            case "222206":
                str = "服务端请求失败";
                break;
            case "222202":
                str = "图片中没有人脸";
                break;
            case "222203":
                str = "无法解析人脸";
                break;
            case "223113":
                str = "人脸有被遮挡";
                break;
            case "223114":
                str = "人脸模糊";
                break;
            case "223115":
                str = "人脸光照不好";
                break;
            case "223116":
                str = "人脸不完整";
                break;
            case "223120":
                str = "活体检测未通过";
                break;
            case "223121":
                str = "左眼遮挡程度过高";
                break;
            case "223122":
                str = "右眼遮挡程度过高";
                break;
            case "223123":
                str = "左脸遮挡程度过高";
                break;
            case "223124":
                str = "右脸遮挡程度过高";
                break;
            case "223125":
                str = "下巴遮挡程度过高";
                break;
            case "223126":
                str = "鼻子遮挡程度过高";
                break;
            case "223127":
                str = "嘴巴遮挡程度过高";
                break;
            default:
                str = error;
                break;


        }
        return str;

    }

}
